﻿using ContactCenter.Core;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;

namespace ContactCenter.Persistence.NH.Tasks
{
    public class SchemaExportTask : TaskBase
    {
        public override int Position
        {
            get { return int.MaxValue; }
        }

        public override bool CanConfigureCore()
        {
            return App.NonWeb();
        }

        public override Configuration Configure(Configuration configuration)
        {
            new SchemaExport(configuration).Create(false, true);

            return configuration;
        }
    }
}